# Gemini tool: gmi2html

I couldn't find a tool for converting gemini markup to html. I'm sure there are many, but my searching skills failed me.

Anyways, writing one is trivial, so I did just that. Maybe you don't have to do the same now :D

## Installation

```
pip3 install git+https://notabug.org/tinyrabbit/gmi2html.git#egg=gmi2html

```

## Command Line Usage

```
usage: gmi2html [-h] [--inline-img] [F [F ...]]

Convert text/gemini to text/html, print to stdout.

positional arguments:
  F             All files to convert. (Leave empty or '-' for stdin)

optional arguments:
  -h, --help    show this help message and exit
  --inline-img  Inline png, jpg/jpeg, gif, webp, svg links.
```

Both of the following examples produce the same output:

```
gmi2html testfile.gmi
```
and
```
cat testfile.gmi | gmi2html
```

Link text for inline images will be added as the `alt=''` attribute in the `img` tag.

## Library Usage

```
import gmi2html

gmi2html.convert(files, inlineImg)
```

Note that this will print to stdout. I have yet to implement an output argument.

## Pull Requests are Welcome!

It's still going to be a tiny tool, but tell me if you have ideas for improvements.

## Credits

Thanks to Solène (@solene@bsd.network) for feature suggestions and bug fixes!

